package com.catering.mapper;

import com.catering.pojo.DOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 徐
* @description 针对表【d_order】的数据库操作Mapper
* @createDate 2025-04-11 10:44:25
* @Entity com.catering.pojo.DOrder
*/
public interface DOrderMapper extends BaseMapper<DOrder> {
    void insertOrder(DOrder order);
    DOrder selectByOrder(@Param("uid") Integer uid,@Param("id") Integer id);
    void deleteByOrder(Integer id);
    DOrder selectByDateAndPhone(@Param("orderDate") String orderDate,@Param("phone") String phone);
    List<DOrder> selectByUid(Integer uid);
    DOrder selectByOrder1(@Param("uid") Integer uid,@Param("id") Integer id);

    // 新增：检查指定时间范围内是否有预约
    DOrder selectByTimeRange(@Param("uid") Integer uid,
                             @Param("phone") String phone,
                             @Param("startTime") String startTime,
                             @Param("endTime") String endTime);
}




